

% read txt file
%fileID = fopen('summary_kineticsresults.txt', 'r');
%fileID = fopen('hazetot.txt_3e4_1e5','r');
%fileID = fopen('hazetot.txt_3e5_1e5_dja','r');
%fileID = fopen('hazetot_krain_nov21.txt','r');
%fileID = fopen('hazetot_krain_nov25_vhaze.txt','r');
%fileID = fopen('hazetot_krain_nov25_vhaze_krain.txt','r');
%fileID = fopen('hazetot_krain_nov25_vhaze_solve2.txt','r')
%fileID = fopen('hazetot_krain_nov25_vhaze_dec11more.txt','r');
%fileID = fopen('hazetot_eddy1e5_shield300_jan8.txt','r');
%fileID = fopen('hazetot_eddy1e5_shield300_kr_jan22.txt','r');
fileID=fopen('hazetot_eddy1e5_shield300_krON_jan25.txt','r');
data = textscan(fileID, '%f %f %f %f', 'Delimiter', ' ', 'MultipleDelimsAsOne', true);
fclose(fileID);

% Extract columns 
Ts = data{1};
fv = data{2};
hazeconc = data{3}
mconc = data{4}

results = zeros(size(hazeconc));
outputFileID = fopen('results-eddy1e5-shield300-krON-jan25.txt', 'w');
for i = 1:length(hazeconc)
	  results(i) = opd_loop_wvl_a(hazeconc(i)+mconc(i),mod(i,20)+1);
          fprintf(outputFileID, 'Input: %.2e, Result: %.4f\n', hazeconc(i), results(i));
end


	  
	  
